<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>{$current['title']}-{$Think.CONFIG.sitename}</title>

    <link href="__PUBLIC__/static/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="__PUBLIC__/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/static/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/static/css/plugins/summernote/summernote.css" rel="stylesheet">
    <link href="__PUBLIC__/static/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">
    <link href="__PUBLIC__/static/css/animate.min.css" rel="stylesheet">
    <include file="Public/commoncss" />
    <!-- Sweet Alert -->
    <link href="__PUBLIC__/static/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
</head>

<body class="gray-bg top-navigation">
<div id="wrapper">
    <div id="page-wrapper" class="gray-bg">
        <div class="row border-bottom white-bg">
            <include file="Public/header" />
        </div>
        <div class="wrapper wrapper-content">
            <div class="row">
                <div class="col-sm-12 animated fadeInRight">
                    <div class="col-sm-4">
                        <div class="ibox float-e-margins">
                            <div class="ibox-title">
                                <if condition="$people['uid'] neq $user['uid']">
                                    <h5>他的资料</h5>
                                    <else/>
                                    <h5>我的资料</h5>
                                </if>
                            </div>
                            <div>
                                <div class="ibox-content no-padding border-left-right">
                                    <notempty name="people.head">
                                        <img alt="image" class="img-responsive" src="{$people.head}">
                                    </notempty>
                                    <empty name="people.head">
                                        <img alt="image" class="img-responsive" src="__PUBLIC__/static/img/profile_big.jpg">
                                    </empty>
                                </div>
                                <div class="ibox-content profile-content">
                                    <h4> 姓 名 :<strong>{$people.name}</strong></h4>
                                    <p>工作团队：{$people.dept_name}</p>
                                    <p>职位头衔：{$people.rank}</p>
                                    <h5>联系方式：</h5>
                                    <p> 手 机：{$people.phone}</p>
                                    <p>分机号：{$people.tel}</p>
                                    <p> Q Q ：{$people.qq}</p>
                                    <p> 邮 箱：{$people.email}</p>
                                    <div class="row m-t-lg">
                                        <notempty name="shareCount">
                                        <div class="col-sm-6">
                                            <span class="bar" style="display: none;">5,3,9,6,5,9,7,3,5,2</span><svg class="peity" height="16" width="32"><rect fill="#1ab394" x="0" y="7.111111111111111" width="2.3" height="8.88888888888889"></rect><rect fill="#d7d7d7" x="3.3" y="10.666666666666668" width="2.3" height="5.333333333333333"></rect><rect fill="#1ab394" x="6.6" y="0" width="2.3" height="16"></rect><rect fill="#d7d7d7" x="9.899999999999999" y="5.333333333333334" width="2.3" height="10.666666666666666"></rect><rect fill="#1ab394" x="13.2" y="7.111111111111111" width="2.3" height="8.88888888888889"></rect><rect fill="#d7d7d7" x="16.5" y="0" width="2.3" height="16"></rect><rect fill="#1ab394" x="19.799999999999997" y="3.555555555555557" width="2.3" height="12.444444444444443"></rect><rect fill="#d7d7d7" x="23.099999999999998" y="10.666666666666668" width="2.3" height="5.333333333333333"></rect><rect fill="#1ab394" x="26.4" y="7.111111111111111" width="2.3" height="8.88888888888889"></rect><rect fill="#d7d7d7" x="29.7" y="12.444444444444445" width="2.3" height="3.5555555555555554"></rect></svg>
                                            <h5>已累计<strong>{$shareCount}</strong> 个分享</h5>
                                        </div>
                                        </notempty>
                                        <notempty name="prezCount">
                                        <div class="col-sm-6">
                                            <span class="line" style="display: none;">5,3,9,6,5,9,7,3,5,2</span><svg class="peity" height="16" width="32"><polygon fill="#1ab394" points="0 15 0 7.166666666666666 3.5555555555555554 10.5 7.111111111111111 0.5 10.666666666666666 5.5 14.222222222222221 7.166666666666666 17.77777777777778 0.5 21.333333333333332 3.833333333333332 24.888888888888886 10.5 28.444444444444443 7.166666666666666 32 12.166666666666666 32 15"></polygon><polyline fill="transparent" points="0 7.166666666666666 3.5555555555555554 10.5 7.111111111111111 0.5 10.666666666666666 5.5 14.222222222222221 7.166666666666666 17.77777777777778 0.5 21.333333333333332 3.833333333333332 24.888888888888886 10.5 28.444444444444443 7.166666666666666 32 12.166666666666666" stroke="#169c81" stroke-width="1" stroke-linecap="square"></polyline></svg>
                                            <h5>获得<strong>{$prezCount}</strong> 个赞</h5>
                                        </div>
                                        </notempty>
                                    </div>
                                    <div class="user-button">
                                        <div class="row">
                                            <!--<div class="col-sm-6">-->
                                                <!--<button type="button" class="btn btn-primary btn-sm btn-block"><i class="fa fa-share"></i> 给他分享</button>-->
                                            <!--</div>-->
                                            <!--<div class="col-sm-6">-->
                                                <!--<button type="button" class="btn btn-info btn-sm btn-block"><i class="fa fa-thumbs-up"></i> 给他赞一个</button>-->
                                            <!--</div>-->
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-8">
                        <div class="ibox float-e-margins">
                            <div class="ibox-title">
                                <if condition="$people['uid'] neq $user['uid']">
                                    <h5>他的动态</h5>
                                    <elseif condition="$_GET['uid'] eq $user['uid']"/>
                                    <h5>我的动态</h5>
                                    <else/>
                                    <h5>最新动态</h5>
                                </if>
                                <div class="ibox-tools">
                                    <a href="javascript:;" class="btn btn-primary btn-xs" data-toggle="modal" data-target="#modal-form">发个说说</a>
                                </div>
                            </div>
                            <div class="ibox-content">

                                <div>
                                    <div class="feed-activity-list">

                                            <div class="feed-element hide">

                                            </div>

                                </div>

                                    <button class="btn btn-primary btn-block m page"><i class="fa fa-arrow-down"></i> 显示更多</button>

                                </div>

                            </div>
                        </div>

                    </div>

                </div>
            </div>
        </div>
        <!--添加窗口-->
        <div id="modal-form" class="modal fade" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-body">
                        <div class="row">
                            <form action="{:U('rlstalk')}" role="form" id="myForm">
                                <div>
                                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
                                </div>
                                <div class="col-sm-12">
                                    <h3 class="m-t-none m-b">发个说说吧，想说点什么呢？</h3>
                                    <div class="form-group">
                                        <input type="hidden" name="title" value="{$user.name} ，发了条说说！快来观望啦">
                                        <textarea name="content" id="content" placeholder="说点儿什么吧！O(∩_∩)O" class="form-control m-b" rows="3"  datatype="*3-500"  nullmsg="系统君说：不可以说空话哦！" errormsg="一句话要超过三个字" sucmsg="( ^_^ )不错嘛！" style="resize: none;width:100%;"  autocomplete="off"></textarea>
                                        <p class="Validform_checktip"></p>
                                    </div>
                                </div>
                                <div class="col-sm-12">
                                    <button class="btn btn-sm btn-primary pull-right m-t-n-xs" type="submit"><strong>发布吧！</strong></button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <include file="Public/footer" />
        <input type="hidden" id="page" value="1">
    </div>
</div>
<include file="Public/commonjs" />
<script src="__PUBLIC__/static/js/bootstrap.min.js?v=3.3.5"></script>
<script src="__PUBLIC__/static/js/content.min.js?v=1.0.0"></script>
<script src="__PUBLIC__/static/js/plugins/sweetalert/sweetalert.min.js"></script>
<script src="__PUBLIC__/static/js/plugins/validate/Validform_v5.3.2.js"></script>
<script>
    $(document).ready(function() {
        //点赞
        $(document).on("click",".prez",function(){
            var id= $(this).attr("val");
            var _this = $(this);
            $.post("{:U('News/prez')}",{id:id},function(data){
                if(data.status !== 'y'){
                    swal('操作失败!', "参数错误原因可能是程序没有获取到参数！", "warning");
                }else{
                    $(_this).addClass('red-bg').removeClass('prez').html('<i class="'+'fa fa-thumbs-up'+'"></i>已赞');
                }
            });

        });

        //获取动态
        getData(1,"{$_GET['uid']}");

        //加载更多数据
        $('.page').on("click",function () {
            var i = $("#page").val();
            getData(i,"{$_GET['uid']}");
        });

        //提交表单
        $("#myForm").Validform({
            tiptype:function(msg,o,cssctl){
                if(!o.obj.is("form")){
                    var objtip=o.obj.siblings(".Validform_checktip");
                    cssctl(objtip,o.type);
                    objtip.text(msg);
                }else{
                    if(msg == '恭喜，操作成功！'){
                        window.location.reload();
                    }else{
                        var objtip=o.obj.siblings(".Validform_checktip");
                        cssctl(objtip,o.type);
                        objtip.text(msg);
                    }
                }
            },
            ajaxPost:true
        });

    });

    var getData = function (i,uid){
        $.post("{:U('ajaxMany')}",{p:i,uid:uid},function(data){
            if(data.status !== 'y'){
                swal(data.info);
            }else{
                $(".feed-element:last").after(data.list),$("#page").val(data.page);
            }
        });
    }
</script>

</body>

</html>